<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <input type="button" value="点我" @click="add"/>
    </div>

    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        let vm=new Vue({
            el:"#app",
            data:{
                name:"xixi",
            },
            methods:{
                add: function () {
                    console.log(this.name);
                }
            }
        })
    </script>

</body>
</html>